#pragma once
#include "cocos2d.h"

using namespace cocos2d;

class PlayerBox : public Sprite
{
	~PlayerBox();
	int m_nPlayerIndex;
	Sprite* m_pFinishSprite;
	Label* m_pCurrentPrice;
	void showCurrentPrice(Ref* pObj);
	void refresh(Ref* pObj);

	bool init(unsigned int nBoxColor);

public:
	enum
	{
		GREEN = 0,
		YELLOW = 1,
		RED = 2,
		GRAY = 3
	};

	static PlayerBox* create(unsigned int nBoxColor);
};

class PlayerBoard : public Layer
{
	Sprite* m_pBase;

	virtual bool init();
	
	int x = 0;

public:
	CREATE_FUNC(PlayerBoard);

	virtual void onEnter();
	void playEarnMoneyAnimation(int nPlayerIndex, int nMoney);
};

